package com.xique.blelock.model;

import android.support.annotation.NonNull;

import java.io.Serializable;

/**
 * Created by Administrator on 2018/12/14.
 */

public class Operationinfo implements Serializable, Comparable<Operationinfo>{
//     "uid": "xxx",
//             "mode": 1,
//             "order": 123,
//             "time": "1540975830999",
//             "result": "lockid00001"

    private String uid;
    private int order;
    private  int mode;
    private String time;
    private int result;

    private String nickName;

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public int getMode() {
        return mode;
    }

    public void setMode(int mode) {
        this.mode = mode;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    @Override
    public int compareTo(@NonNull Operationinfo operationinfo) {
        long thistime = Long.parseLong(time);
        long thetime = Long.parseLong(operationinfo.getTime());
        return (int) (thetime - thistime);
    }
}
